<div class="zs-body" data-ng-init="formInit('roleentrust', {
			keyField:'id',
			randomFields:['id'],
			orderObject:{id:0} 
		}) && loadData('roleentrust');setConHei();">
    <div class="zs-map-tool">
		<div class="location">
			<a >首页</a>
			<i class="right-arr"></i>
			<a >运维管理</a>
			<i class="right-arr"></i>
			<a >工作委托</a>
		</div>
		<div class="option">
			<input type="button" class="zs-btn orange" value="新建" 
				ng-click="addRow('roleentrust') && openWindow('edit');"/>
			<input type="button" class="zs-btn orange" value="编辑" 
				ng-click="editRow('roleentrust', roleentrust.sRows[0]) && openWindow('edit')"/>
			<input type="button" class="zs-btn orange" value="删除 " 
				ng-click="delEntitys('roleentrust')"/>
		</div>
	</div>
    <div class="zs-content" style="position:unset">
    	<div class="zs-nice-tab idTabs">
    		<div class="link item">
    			<a class="selected">全部委托</a>
    			<a >有效委托</a>
    			<a >无效委托</a>
    		</div>
    		<div class="tool item">
	    		<span class="search-warpper">
	    			<i class="icon"></i>
		    		<input type="text" class="zs-input" ng-model="roleentrust.queryObject['roleentrustName:like']"/>
	    		</span>
    		</div>
    		<div class="operation item">
    			<a  class="ope-1" ng-click="loadData('roleentrust')"></a>
    			<a  class="ope-2"></a>
    		</div>
    		<div class="switch">
    			
    		</div>
    	</div>
    	<div class="date-container">
	    	<div id="zpgwd">
	    		<div class="zs-data-table">
	    			<div class="container">
				        <table>
				            <thead>
			                    <tr>
			                        <th>
			                        	<input id="allCheckbox" type="checkbox"
			                        		ng-click="selectAll('roleentrust','allCheckbox');">
			                        </th>
			                        <th>委托人->被委托人</th>
			                        <th>委托角色</th>
			                        <th>开始-结束时间</th>
			                        <th>是否启用/有效</th>
			                    </tr>
			                </thead>
			                <tbody>
			                    <tr ng-repeat="r in roleentrust.datas">
					                <td><input type="checkbox"
						                    ng-click="selectRow('roleentrust',r);"
						                    ng-model="r.selected" />
					                </td>
					                <td>
					                    <a ng-click="editRow('roleentrust',r) && openWindow('edit');">
					                        <label ng-bind="r.entrustUserName"></label>
					                        ->
					                        <label ng-bind="r.entrustedUserName"></label>
					                    </a>
					                </td>
					                <td>
					                    <a ng-click="editRow('roleentrust',r) && openWindow('edit');">
					                        <label ng-bind="r.entrustRoleName"></label>
					                    </a>
					                </td>
					                <td>
					                    <a ng-click="editRow('roleentrust',r) && openWindow('edit');">
					                        <label ng-bind="r.beginTime"></label>
					                        -
					                        <label ng-bind="r.endTime"></label>
					                    </a>
					                </td>
					                <td>
					                    <a ng-click="editRow('roleentrust',r) && openWindow('edit');">
					                        <label ng-bind="r.canUse | asChineseBool"></label>
					                        /
					                        <label ng-bind="r.valid | asChineseBool"></label>
					                    </a>
					                </td>
					            </tr>
			                </tbody>
				        </table>
	    			</div>
	    			<div class="zs-pagination-box">
			            <ag-Page fn='roleentrust'></ag-Page>
			        </div>
			    </div>
	    	</div>
    	</div>
    	<div ag-Window id="edit" title="角色委托" width='660px' height='260px'>
	        <div class="zs-form-tab ibox">
	        	<form name="form" novalidate>
				    <table>
				        <tbody>
	                        <tr>
	                            <td class="text" width="20%">*角色名称</td>
	                            <td colspan="3" class="left" width="80%"><input type="text" alias="角色名称"
	                                name="formUserName" ng-model="roleentrust.editRow.roleentrustName"
	                                class="zs-input" required></td>
	                        </tr>
	                        <tr>
	                            <td class="text" width="20%">角色描述</td>
	                            <td colspan="3" class="left" width="80%"><input type="text"
	                                ng-model="roleentrust.editRow.roleentrustDesc" class="zs-input"></td>
	                        </tr>
				        </tbody>
				        <tfoot>
				            <tr>
				                <td colspan="5">
				                    <input type="button" name="ok" value="保存" class="zs-btn c-red"
				                    	ng-click="formValidate(form) && save('roleentrust', roleentrust.editRow, saveCloseWindow)"/>
				                    <input type="button" name="ok" value="取消" class="zs-btn c-green" 
				                    	ng-click="closeWindow('edit')" />
				                </td>
				            </tr>
				        </tfoot>
				    </table>
				</form>
			</div>
	    </div>
    </div>
</div>